package com.itheima.thread.等待唤醒机制.送奶工案例;
//临界资源类
public class Box {
    //桌子状态
    private boolean flag;
    //货物总量
    private int count;

    public Box() {
        this(false,30);
    }

    public Box(boolean flag, int count) {
        this.flag = flag;
        this.count = count;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public void countSubtract(){
        count--;
    }
}
